# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-questionary
_pkgname=questionary
pkgver=2.1.1
pkgrel=1
pkgdesc='Library to build pretty command line user prompts.'
arch=('any')
url='https://pypi.org/project/questionary/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('a21b046375a7c82374c3e023662ddc9600cdddd9bde68d7f1b6a0d6b87ae7614b99f7fc3f509743ff0ab61036f600be567290ad20a1dbda941e293d397ea1ab2')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

	pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

